﻿<!-- 
Filename: AllFrontTheme.xaml
Version: 20150108
-->

<ResourceDictionary
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:local="clr-namespace:FlipPanel;assembly=FlipPanel">

  <ControlTemplate x:Key="FlipPanel_AllFrontTemplate" TargetType="local:FlipPanel">
    <Grid Name="LayoutRoot"
      HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
      VerticalAlignment="{TemplateBinding VerticalAlignment}"
      >
      <!-- need LayoutRoot to hold (and programmatically find) the VSM-->

      <Grid.RowDefinitions>
        <RowDefinition Height="*" />
        <!-- <RowDefinition Height="Auto" /> --> <!-- see http://www.silverlightshow.net/items/Using-the-GridSplitter-control-in-Silverlight-2-Beta-1.aspx if you want to add a GridSplitter control -->
        <RowDefinition Height="*" />        
      </Grid.RowDefinitions>

      <!-- This is the "front" content. -->
      <Border Grid.Row="0"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding CornerRadius}"
              Background="{TemplateBinding Background}" 
              >

        <ContentPresenter Content="{TemplateBinding FrontContent}" 
                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                          />

      </Border>

      <!-- Back content -->
      <Border Grid.Row="1" 
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              CornerRadius="{TemplateBinding CornerRadius}"
              Background="{TemplateBinding Background}" 
              RenderTransformOrigin="0,1">
        
        <ContentPresenter Content="{TemplateBinding BackContent}"
                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"                          
                          />

      </Border>

    </Grid>

  </ControlTemplate>

  <Style x:Key="FlipPanel_AllFrontStyle" TargetType="local:FlipPanel">
    <Setter Property="Template" Value="{StaticResource FlipPanel_AllFrontTemplate}"/>
  </Style>

</ResourceDictionary>
